-
Notifications
You must be signed in to change notification settings - Fork 8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(gin): support http3 using quic-go/quic-go #3210
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #3210 +/- ##
==========================================
- Coverage 99.21% 99.19% -0.03%
==========================================
Files 42 43 +1
Lines 3182 2722 -460
==========================================
- Hits 3157 2700 -457
+ Misses 17 12 -5
- Partials 8 10 +2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
don't use http3.ListenAndServeQUIC
Util1.GTls will be obtained from the dynamic ca server challenge |
ping @thinkerou |
New repo: https://github.com/quic-go/quic-go |
@thinkerou Can you keep working on this PR? |
updated, but have unit test error:
https://github.com/gin-gonic/gin/actions/runs/4806024121/jobs/8553052446?pr=3210 |
@thinkerou is there a running version for current stable and an example? |
1.19 support Ended 2 weeks ago |
Waiting for golang/go#58547 QUIC implementation |
This error is anticipated and isn't blocking. Here is the info about it from Cloudflared where it has been used in production for a number of years: https://github.com/quic-go/quic-go/wiki/UDP-Buffer-Sizes Duly noted on Golang official implementation, adding in the info here though for reference. Will subscribe to the tracking issue and lend a hand when the time is right. |
And here with a fixed test example: maggie44@790cfe2 |
Since mid 2023, quic-go is using crypto/tls (since crypto/tls gained QUIC support in Go 1.20), and we don't impose any limitations on Go versions anymore. This PR should probably be updated to use a more recent quic-go version. |
Is there any necessity to make these changes? It works fine when you just provide Versions used
Example code
|
The idea is to add a r.RunQUIC() like there is a r.Run(). https://gin-gonic.com/docs/quickstart/ But like r.Run() it’s not necessary to use it. |
new error:
|
- Remove dynamic Go versioning in favor of pinning to major version `1` - Update linter version from `v1.56.2` to `v1.58.1` in GitHub Actions workflow Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
- Update the golangci-lint-action version from `v5` to `v6` in the GitHub workflow configuration Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
- Update Go version requirement from `1.20` to `1.21` in `go.mod` Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
since the quic-go/quic-go only support go v1.21 version, I upgrade the go.mod to 1.21 version. https://github.com/quic-go/quic-go/blob/d1c1f18e4c707d26f038698c9f67d77ec85a14a5/go.mod#L3 |
- Add an empty line in the import section of `gin.go` Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
- Add `gin.go` to the list of files with specific linters in `.golangci.yml`, applying the `gci` linter. Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
but, quic-go supports the min go version is 1.19
and remove go1.15 for compiling successful